Visitors Unchained

ثبت نشده
چکیده

Traversing and transforming abstract syntax trees that involve name binding is notoriously di cult to do in a correct, concise, modular, customizable manner. We address this problem in the setting of OCaml, a functional programming language equipped with powerful object-oriented features. We use visitor classes as partial, composable descriptions of the operations that we wish to perform on abstract syntax trees. We introduce visitors, a simple type-directed facility for generating visitor classes that have no knowledge of binding. Separately, we present alphaLib, a library of small hand-written visitor classes, each of which knows about a speci c binding construct, a speci c representation of names, and/or a speci c operation on abstract syntax trees. By combining these components, a wide range of operations can be de ned. Multiple representations of names can be supported, as well as conversions between representations. Binding structure can be described either in a programmatic style, by writing visitor methods, or in a declarative style, via preprogrammed binding combinators.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Visitors Unchained

Traversing and transforming abstract syntax trees that involve name binding is notoriously difficult to do in a correct, concise, modular, customizable manner. We address this problem in the setting of OCaml, a functional programming language equipped with powerful object-oriented features. We use visitor classes as partial, composable descriptions of the operations that we wish to perform on a...

متن کامل

Psychiatric disorders in multiple sclerosis patients.

Multiple sclerosis (MS) is a demyelinating disease showing variable clinical presentation. Optic neuritis is the most common symptom, followed by motor and sensitive manifestations. It is known that this disease may be related to several psychiatric disorders, especially depression. In this study we will discribe 5 cases of MS patients harboring psychiatric disorder related or unchained by the ...

متن کامل

Perceptual compromise between apparent and veridical motion indices: the unchained-dots illusion.

A new motion illusion based on dot-trajectory misperception is presented. The illusory effect can not be explained by the aperture problem unlike some previous illusions characterised by misperception of motion direction. We propose an explanation in terms of 'perceptual compromise' between an original type of apparent motion and the veridical motion. Several demonstrations are presented in sup...

متن کامل

The Relationship of Place Attachment and the Satisfaction of Visitors in Cinema Multiplex (Case Study: Pardis Melat and koorosh, Tehran, Iran)

The study tested whether place attachment enhances the place satisfaction among visitors of the multiplex cinema in Tehran-Iran. Structural equation modeling was employed on a sample of 220 visitors. Regression models were estimated to test the relationship of place attachment and place satisfactions of visitors. Place attachment has the four dimensions of place dependence, place identity, plac...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017